home *** CD-ROM | disk | FTP | other *** search
/ Electronic Entertainment 1995 June / Electronic Entertainment CD-ROM Sampler Disc (June 1995).iso / pc / reflux / shared.dxr / 00466.ls < prev    next >
Encoding:
Text File  |  1995-04-05  |  1.2 KB  |  50 lines

  1. on animate snd, chan, startCast, castCnt, fps, pic
  2.   puppetSprite(chan, 1)
  3.   if snd <> EMPTY then
  4.     puppetSound(snd)
  5.   end if
  6.   set nTicks to 60 / fps
  7.   set first to the number of cast startCast
  8.   set last to the number of cast startCast + abs(castCnt) - 1
  9.   if castCnt >= 0 then
  10.     repeat with n = first to last
  11.       set start to the ticks
  12.       set the castNum of sprite chan to n
  13.       updateStage()
  14.       repeat while (the ticks - start) < nTicks
  15.       end repeat
  16.     end repeat
  17.   else
  18.     repeat with n = last down to first
  19.       set start to the ticks
  20.       set the castNum of sprite chan to n
  21.       updateStage()
  22.       repeat while (the ticks - start) < nTicks
  23.       end repeat
  24.     end repeat
  25.   end if
  26.   if pic <> EMPTY then
  27.     set the castNum of sprite chan to the number of cast pic
  28.     updateStage()
  29.   end if
  30. end
  31.  
  32. on buttonPress snd, chan, onCast, offCast
  33.   if snd <> EMPTY then
  34.     puppetSound(snd)
  35.   end if
  36.   puppetSprite(chan, 1)
  37.   set the castNum of sprite chan to the number of cast onCast
  38.   updateStage()
  39.   repeat while the mouseDown
  40.   end repeat
  41.   set the castNum of sprite chan to the number of cast offCast
  42.   updateStage()
  43. end
  44.  
  45. on delay cnt
  46.   set start to the ticks
  47.   repeat while (the ticks - start) < cnt
  48.   end repeat
  49. end
  50.